package kr.saeildamil.androidforstudy2.ch20;

import kr.saeildamil.androidforstudy2.R;
import kr.saeildamil.androidforstudy2.ch20.common.WordListFragment.onWordChangedListener;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

public class WordList extends Activity implements onWordChangedListener {
	
	TextView worddesc;
	String[] details;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.ch20_wordlist);
		worddesc = (TextView) findViewById(R.id.ch20_wordlist_worddesc);
		details = getResources().getStringArray(R.array.desc);
	}
	
	@Override
	public void onWordChanged(int index) {
		worddesc.setText(details[index]);
	}
}
